package  {
	import idv.cjcat.signals.ISignal;
	import idv.cjcat.signals.Signal;
	
	public class Counter{
		
		private var _onChange:ISignal = new Signal(int);
		public function get onChange():ISignal { return _onChange; }
		
		private var _value:int = 0;
		
		public function getValue():int { return _value; }
		public function setValue(value:int):void {
			if (_value != value) {
				_value = value;
				_onChange.dispatch(_value);
			}
		}
	}
}